package com.keba.lamp.online.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Schema(description = "自动化案件任务参数对象")
@Data
public class OnlineCaseParamVO {

    private LoginUser loginUser;

    private CaseInfo caseInfo;

    private List<Evidence> evidences;

    private Accuser accuser;

    private List<Accused> accuseds;

    private List<AgentUser> agentUsers;

    private List<ThirdUser> thirdUsers;


    /**
     * 登录用户信息
     */
    @Data
    static class LoginUser {
        @Schema(description = "用户名")
        private String username;
        @Schema(description = "密码")
        private String password;
    }


    /**
     * 案件基本信息
     */
    @Data
    static class CaseInfo {
        @Schema(description = "案件类型")
        private String type;

        @Schema(description = "受理法院")
        private String courtName;

        @Schema(description = "立案案由")
        private String cause;

        @Schema(description = "标的金额")
        private BigDecimal amount;

        @Schema(description = "诉讼请求")
        private String claim;

        @Schema(description = "事实与理由")
        private String fact;

    }

    /**
     * 证据信息
     */
    @Data
    static class Evidence {
        @Schema(description = "证据类型")
        private String type;

        @Schema(description = "证据名称")
        private String name;

        @Schema(description = "证据下载链接")
        private String url;
    }

    /**
     * 案件当事人基类
     */
    @Data
    abstract static class BaseLitigant {
        @Schema(description = "类型", example = "法人,自然人,其他组织")
        private String type;

        @Schema(description = "姓名|单位名称")
        private String name;

        @Schema(description = "性别", example = "男,女,不详")
        private String gender;

        @Schema(description = "国别", example = "中国")
        private String country;

        @Schema(description = "证件类型", example = "居民身份证")
        private String identityType;

        @Schema(description = "证件号码")
        private String identityNo;

        @Schema(description = "住所地|单位所在地")
        private String address;

        @Schema(description = "手机号码")
        private String phone;
    }

    /**
     * 原告信息（可以不传，默认就是当前登录用户）
     */
    @Data
    static class Accuser {
        @Schema(description = "姓名")
        private String name;

        @Schema(description = "证件号码")
        private String identityNo;

        @Schema(description = "住所地")
        private String address;

        @Schema(description = "手机号码")
        private String phone;
    }

    /**
     * 被告信息
     */
    @Data
    static class Accused extends BaseLitigant { }

    /**
     * 第三人信息
     */
    @Data
    static class ThirdUser extends BaseLitigant { }

    /**
     * 代理人信息
     */
    @Data
    static class AgentUser {

        @Schema(description = "代理人类型", example = "律师,法律服务工作者,其他")
        private String type;

        @Schema(description = "姓名")
        private String name;

        @Schema(description = "证件类型", example = "居民身份证")
        private String identityType;

        @Schema(description = "证件号码")
        private String identityNo;

        @Schema(description = "执业证号码")
        private String certificateNo;

        @Schema(description = "手机号码")
        private String phone;
    }


}
